/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2021-2025. All rights reserved.
 *
 */

import path from 'path';

export class BuildDirConst {
  static readonly HVIGOR_COMPILE: string = 'hvigorCompile';

  static readonly BUILD_ROOT: string = 'build';

  static readonly PREVIEW_BUILD_PATH: string = '.preview';

  static readonly TEST_BUILD_PATH: string = '.test';

  static readonly INTERMEDIATES: string = 'intermediates';

  static readonly GENERATED: string = 'generated';

  static readonly BUILD_OUTPUTS: string = 'outputs';

  static readonly INTERMEDIATES_ORIGINAL_RES: string = 'original_res';

  static readonly INTERMEDIATES_MERGE_RES: string = 'merge_res';

  static readonly INTERMEDIATES_MERGE_PROFILE: string = 'merge_profile';

  static readonly INTERMEDIATES_PROCESS_PROFILE: string = 'process_profile';

  static readonly LEGACY_MANIFEST: string = 'manifest';

  static readonly INTERMEDIATES_JS: string = 'js';

  static readonly INTERMEDIATES_RES: string = 'res';

  static readonly RESTOOL_BUILD_RESOURCES: string = 'resources';

  static readonly RAW_FILE: string = 'rawfile';

  static readonly ARK_DATA: string = 'arkdata';

  static readonly SCHEMA: string = 'schema';

  static readonly UTD: string = 'utd';

  static readonly LITE_SOURCES: string = 'lite_source';

  static readonly LOADER_OUT: string = 'loader_out';

  static readonly LOADER_OUT_LITE: string = 'loader_out_lite';

  static readonly JS_BUILD_ASSETS: string = 'assets';

  static readonly LOADER: string = 'loader';

  static readonly BUILD_CACHE: string = 'cache';

  static readonly CPP_OUTPUT: string = '.cxx';

  static readonly LIBS: string = 'libs';

  static readonly STRIPPED_NATIVE_LIBS = 'stripped_native_libs';

  static readonly PATCH = 'patch';

  static readonly SHELL: string = 'shell';

  static readonly SRC: string = 'src';

  static readonly MAIN: string = 'main';

  static readonly MOCK: string = 'mock';

  static readonly RESOURCES: string = 'resources';

  static readonly SYSCAP: string = 'syscap';

  static readonly BASE: string = 'base';

  static readonly PROFILE: string = 'profile';

  static readonly R: string = 'r';

  static readonly CMAKE: string = 'cmake';

  static readonly OBJ: string = 'obj';

  static readonly APP_COMPILED: string = 'app_compiled';

  static readonly MODULE_COMPILED: string = 'module_compiled';

  static readonly HAR_COMPILED: string = 'har_compiled';

  static readonly IDS_MAP: string = 'ids_map';

  static readonly TEMP_DIR: string = 'temp';

  static readonly PM_DIR: string = 'pm';

  static readonly HAP_METADATA = 'hap_metadata';

  static readonly HSP_METADATA = 'hsp_metadata';

  static readonly TRANSFORM_LIB = 'transformLib';

  static readonly REMOTE_HSP = 'remote_hsp';

  static readonly INTERMEDIATES_ROUTER_MAP_TEMP_DIR: string = 'router_map';

  static readonly INTERMEDIATES_STARTUP_TEMP_DIR: string = 'startup';

  static readonly DEFAULT_STARTUP_CONFIG_FILE_NAME: string = 'startup_config';

  static readonly RESOURCES_BASE_PROFILE_DIR: string = `resources${path.sep}base${path.sep}profile`;

  static readonly SRC_MAIN: string = `${BuildDirConst.SRC}${path.sep}${BuildDirConst.MAIN}`;

  static readonly CPP_TYPES: string = `cpp${path.sep}types`;

  static readonly INTEGRATED_HSP = 'integrated_hsp';

  static readonly MAPPING = 'mapping';

  static readonly PACKAGE_HAP = 'package';

  static readonly DECLARE_FILE_OUTPUT = 'etsFortgz';

  static readonly RESOURCE_STR = 'resource_str';

  static readonly SOURCEMAP_INTERMEDIATE_DIR: string = 'source_map';

  static readonly OUTPUT_SYMBOL: string = 'symbol';

  static readonly PACKAGE_APP: string = 'app';

  static readonly FAST_APP_DIR: string = 'fastApp';

  static readonly PAC_DIR: string = 'privacy_profile';

  static readonly TS = 'ts';

  static readonly ETS = 'ets';

  static readonly DECLGEN = 'declgen';

  static readonly DECLGEN_V1 = 'declgenV1';

  static readonly DECLGEN_V2 = 'declgenV2';

  static readonly DECLGEN_BRIDGE_CODE = 'declgenBridgeCode';

  static readonly DECL_FILE_INFO_JSON = 'decl-fileInfo.json';
}

export class BuildArtifactConst {
  static readonly CONFIG_JSON: string = 'config.json';

  static readonly RESOURCE_INDEX: string = 'resources.index';

  static readonly MERGE_RES_FILE_INDEX: string = 'merge_res_file.index';

  static readonly RESOURCE_TABLE_H: string = 'ResourceTable.h';

  static readonly RESOURCE_TABLE_TXT: string = 'ResourceTable.txt';

  static readonly LEGACY_MANIFEST_JSON: string = 'manifest.json';

  static readonly ID_DEFINED_JSON: string = 'id_defined.json';

  static readonly PACK_INFO: string = 'pack.info';

  static readonly PACK_RES: string = 'pack.res';

  static readonly RELEASE_MAP: string = '_releaseMap';

  static readonly LOADER_JSON: string = 'loader.json';

  static readonly WIDGET_LOADER_JSON: string = 'widget_loader.json';

  static readonly INSIGHT_INTENT_JSON: string = 'insight_intent.json';

  static readonly FORM_CONFIG_JSON: 'form_config.json' = 'form_config.json' as const;

  static readonly PREVIEW_BUILD_PARAM_JSON: string = 'PreviewBuildParam.json';

  static readonly OUTPUT_METADATA_JSON: string = 'output_metadata.json';

  static readonly PROFILE_DIR: string = 'profile';

  static readonly BUILD_PROFILE_FILE: string = 'BuildProfile.ets';

  static readonly MODULE_INFO_FILE: string = 'ModuleInfo.ts';

  static readonly MODULE_JSON5: string = 'module.json5';

  static readonly MOCK_CONFIG_JSON5: string = 'mock-config.json5';

  static readonly MAIN_PAGES_JSON: string = 'main_pages.json';

  static readonly BASE_NATIVE_LIBS_JSON: string = 'base_native_libs.json';

  static readonly INDEX_JS: string = 'index.js';

  static readonly INDEX_ETS: string = 'index.ets';

  static readonly DEFAULT_INDEX_ETS: string = 'Index.ets';

  static readonly INTEGRATED_HSP_CACHE: string = 'integratedHspCache.json';

  static readonly SOURCEMAPS_MAP: string = 'sourceMaps.map';

  static readonly DEFAULT_ROUTER_MAP: string = 'default-router-map';

  static readonly TEMP_ROUTER_MAP_FILE_NAME: string = 'temp-router-map';

  static readonly LOADER_ROUTER_MAP_FILE_NAME: string = 'loader-router-map';

  static readonly MODULES_ABC: string = 'modules.abc';

  static readonly MODULES_STATIC_ABC: string = 'modules_static.abc';

  static readonly NAME_CACHE: string = 'nameCache.json';

  static readonly BYTE_CODE_OBF_CONFIG = 'config.json';

  static readonly APP_SYMBOL: string = 'app-symbol';

  static readonly MOCK_CONFIG_JSON: string = 'mock-config.json';
}

export class BuildArtifactExtension {
  static readonly DOT_HAP: string = '.hap';

  static readonly DOT_BIN: string = '.bin';

  static readonly DOT_APP: string = '.app';

  static readonly DOT_HSP: string = '.hsp';

  static readonly DOT_TGZ: string = '.tgz';

  static readonly DOT_ZIP: string = '.zip';
}

export class ResToolInputTypeConst {
  static readonly APP: string = 'App';
  static readonly MODULE: string = 'Module';
  static readonly HAR: string = 'Har';
}
